package com.project.petLossSystem.common;

/*
存放常量
 */
public interface Constants {
    // 验证码key
    public static final String VERIFY_CODE_KEY = "verifyCode";

    // admin的会话超时时间, 编写时设为-1保证不过期
    public static final int ADMIN_SESSION_EXPIRE = 60 * 30;

    // user的会话超时时间
    public static final int USER_SESSION_EXPIRE = 60 * 30; // 30分钟

    // 验证码的会话时间
    public static final int VERIFY_CODE_EXPIRE = 60 * 5; // 5分钟

    // 时间命名文件格式
    public static final String DATE_FORMAT_FILE_NAME = "yyyyMMdd_HHmmss";

    // 上传图片的路径
    public static final String File_IMAGE_UPLOAD_DIC = "D:\\idea_project\\PetLossSystem\\src\\main\\resources\\upload\\images";

    // 轮播图url
    public static final String CAROUSEL_URL =  "/carousel/";

    // 帖子图片url
    public static final String POST_URL = "/post/";

    // 帖子图片本地目录
    public static final String POST_LOCAL_DIC = "\\post\\";

    // 用户默认头像url
    public static final String PROFILE_URL = "/profile/local/";

    // 一级分类父id
    public static final int TOP_PARENT_ID = 0;

    // 首页热度帖子数量
    public static final int INDEX_POST_COUNT_FOR_VIEWS = 4;

    // 首页新帖子显示数量
    public static final int INDEX_NEW_POST_COUNT = 4;

    // 搜索页面的帖子显示数量
    public static final int SEARCH_POST_COUNT = 8;

    // redis存储浏览量的hashKey
    public static final String HASH_KEY_FOR_VIEWS = "views";

    // yolov5的接口url
    public static final String YOLO_URL = "http://localhost:5000/detect?path=";

    // 上传匹配图片文件夹路径
    public static final String MATCH_URL = "/match/";

    // 上传匹配图片文件夹本地目录
    public static final String MATCH_LOCAL_DIC = "\\match\\";

    // redis存储用户查询图片的缓存key
    public static final String LIST_KEY_FOR_MATCH = "match";

    // 用户头像文件夹路径
    public static final String PROFILE_USER_URL = "/profile/user/";

    // 用户头像文件夹本地路径
    public static final String PROFILE_USER_LOCAL_URL = "\\profile\\user\\";
}
